﻿@using PhoneBook.Core.Domain.Phones
@using PhoneBook.Models.Contacts
@model IEnumerable<PhoneBook.Models.Contacts.ContactListModel>
@{
}

<style>
    .item {
        color: white;
        background-color: gray; 
        box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
        height: 200px;
        float: left;

    }

    .user_group_link {
        color: white;
        text-decoration: none;
    }

    
</style>







@{
    var i = 0;
}

@foreach (ContactListModel item in Model)
{
    <div>

        @Html.Partial("_ContactListItem", item)

    </div>
    i++;
}

<script>
    

   function DeleteContact(url) {
        if(confirm('确认删除？')) {
            $.ajax(url, {
                type: "post",
                contentType: "application/json",
                success: function(result) {
                    if (result.Status == "success") {
                        alert('删除成功');

                        location.reload();
                    }
                    else {
                        alert('删除失败');
                        location.reload();
                    }
                }
            });

        }
   }
   
</script>